<script lang="tsx">
import { ref, defineComponent, unref, watchEffect } from 'vue'
import { ElDropdown, ElDropdownMenu, ElDescriptionsItem } from 'element-plus'
import { ArrowDown } from '@element-plus/icons-vue'

export default defineComponent({
  components: {
    ElDropdown, ElDropdownMenu, ElDescriptionsItem, ArrowDown,
  },
  props: {
  },
  setup(props) {
    const handleCommand = (...args):void => {
      console.log(args)
    }
    return { handleCommand }
  },
  render() {
    return (
      <el-dropdown command="{this.handleCommand}" v-slots={{
        dropdown: () => (
          <el-dropdown-menu>
            <el-dropdown-item command="1">附加费详情</el-dropdown-item>
            <el-dropdown-item command="2">确认账单</el-dropdown-item>
            <el-dropdown-item command="3">单票剔除</el-dropdown-item>
          </el-dropdown-menu>
        ) }}>
        <span class="el-dropdown-link">
          确认推送
          <el-icon class="el-icon--right">
            <arrow-down />
          </el-icon>
        </span>
      </el-dropdown>
    )
  },
})
</script>

<style scoped>
.example-showcase .el-dropdown-link {
  cursor: pointer;
  color: var(--el-color-primary);
  display: flex;
  align-items: center;
}
</style>